#include <iostream>
#include <cstdio>

using namespace std;

// 函数重载
void swap2num(int *a, int *b);
void swap2num(float *a, float *b);

int main(void)
{
    int n1, n2;
    float f1, f2;

    cin >> n1 >> n2;
    cin >> f1 >> f2;

    cout << "n1:" << n1 << ", n2:" << n2 << endl;
    cout << "f1:" << f1 << ", f2:" << f2 << endl;

    cout << "交换" << endl;
    swap2num(&n1, &n2);
    swap2num(&f1, &f2);

    cout << "n1:" << n1 << ", n2:" << n2 << endl;
    cout << "f1:" << f1 << ", f2:" << f2 << endl;

    return 0;
}

void swap2num(int *a, int *b)
{
    int t;

    t = *a;
    *a = *b;
    *b = t;
}

void swap2num(float *a, float *b)
{
    float t;

    t = *a;
    *a = *b;
    *b = t;
}


